package com.Service;

import com.Dao.DeleteInfoDao;
import com.Dao.GetAuthorDao;
import com.Dao.GetBookDao;
import com.pojo.AuthorApply;
import com.pojo.BookExamine;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Service
@Slf4j
public class ExamineService {
    @Autowired
    private GetAuthorDao getApplyAuthorInfo;
    @Autowired
    private DeleteInfoDao deleteApplyInfo;
    @Autowired
    private GetBookDao getBookDao;
    public Map<String,Object> getApplyInfo(int page,int rows) throws SQLException {
       return getApplyAuthorInfo.getAuthorApplyInfo(page,rows);
    }
    public void deleteAuthorApply(String id,int status) throws SQLException {
        int userid=Integer.parseInt(id);
        deleteApplyInfo.deleteAuApplyInfo(userid,status);
    }
    public Map<String,Object> getApplyBook(int page,int rows) throws SQLException {
        return getBookDao.getApplyBook(page,rows);
    }
}
